load("@rules_proto//proto:defs.bzl", "proto_library")

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

##############################################################################
# Common
##############################################################################
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")

proto_library(
    name = "http_request_proto",
    srcs = ["http_request.proto"],
    deps = [
        "//google/api:annotations_proto",
        "@com_google_protobuf//:duration_proto",
    ],
)

proto_library(
    name = "log_severity_proto",
    srcs = ["log_severity.proto"],
    deps = [
        "//google/api:annotations_proto",
        "@com_google_protobuf//:duration_proto",
    ],
)

proto_library_with_info(
    name = "type_proto_with_info",
    deps = [
        ":http_request_proto",
        ":log_severity_proto",
    ],
)

##############################################################################
# Java
##############################################################################
load(
    "@com_google_googleapis_imports//:imports.bzl",
    "java_proto_library",
)

java_proto_library(
    name = "type_java_proto",
    deps = [
        ":http_request_proto",
        ":log_severity_proto",
    ],
)

##############################################################################
# Go
##############################################################################
load("@com_google_googleapis_imports//:imports.bzl", "go_proto_library")

go_proto_library(
    name = "ltype_go_proto",
    importpath = "google.golang.org/genproto/googleapis/logging/type",
    protos = [
        ":http_request_proto",
        ":log_severity_proto",
    ],
    deps = ["//google/api:annotations_go_proto"],
)
